package com.booza.model;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * Domain model for tournament feature. This is only used for user created tournaments. For system generated tournaments
 * @see TournamentDef and @see TournamentInstance.
 */
public class Tournament extends TournamentBase implements Serializable
{
	private static final long serialVersionUID = -3393670632862205351L;
	private Integer tournamentid;
	private Integer gametype;
	private String name;
	private String description;
	private Integer creator;
	private Date createdate;
	private Date starttime;
	private Date accepttime;
	private Integer wager;
	private boolean privacy;
	private boolean friendsinvite;
	private Integer shottimelimit;
	private Integer status;
	private Set players = new HashSet(0);
	private Set statses = new HashSet(0);
	private GameType game;
	private Account account;
	private String winner;

	public String getWinner()
	{
		return winner;
	}

	public void setWinner(String winner)
	{
		this.winner = winner;
	}

	public Tournament() {
		this.shottimelimit = 40;
	}

	public Integer getTournamentid()
	{
		return this.tournamentid;
	}

	public void setTournamentid(Integer tournamentid)
	{
		this.tournamentid = tournamentid;
	}

	public Account getAccount()
	{
		return this.account;
	}

	public void setAccount(Account account)
	{
		this.account = account;
	}

	public Integer getGametype()
	{
		return this.gametype;
	}

	public void setGametype(Integer gametype)
	{
		this.gametype = gametype;
	}

	public String getName()
	{
		return this.name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getDescription()
	{
		return this.description;
	}

	public void setDescription(String description)
	{
		this.description = description;
	}

	public Integer getCreator()
	{
		return creator;
	}

	public void setCreator(Integer creator)
	{
		this.creator = creator;
	}

	public Date getCreatedate()
	{
		return this.createdate;
	}

	public void setCreatedate(Date createdate)
	{
		this.createdate = createdate;
	}

	public Date getStarttime()
	{
		return this.starttime;
	}

	public void setStarttime(Date starttime)
	{
		this.starttime = starttime;
	}

	public Date getAccepttime()
	{
		return this.accepttime;
	}

	public void setAccepttime(Date accepttime)
	{
		this.accepttime = accepttime;
	}

	public Integer getWager()
	{
		return this.wager;
	}

	public void setWager(Integer wager)
	{
		this.wager = wager;
	}

	public boolean getPrivacy()
	{
		return this.privacy;
	}

	public void setPrivacy(boolean privacy)
	{
		this.privacy = privacy;
	}

	public boolean getFriendsinvite()
	{
		return this.friendsinvite;
	}

	public void setFriendsinvite(boolean friendsinvite)
	{
		this.friendsinvite = friendsinvite;
	}

	public Integer getShottimelimit()
	{
		return this.shottimelimit;
	}

	public void setShottimelimit(Integer shottimelimit)
	{
		this.shottimelimit = shottimelimit;
	}

	public Integer getStatus()
	{
		return this.status;
	}

	public void setStatus(Integer status)
	{
		this.status = status;
	}

	public Set getPlayers()
	{
		return players;
	}

	public void setPlayers(Set players)
	{
		this.players = players;
	}

	public Set getStatses()
	{
		return this.statses;
	}

	public void setStatses(Set statses)
	{
		this.statses = statses;
	}

	public GameType getGame()
	{
		return game;
	}

	public void setGame(GameType game)
	{
		this.game = game;
	}

	public Date getTournamentCompletionTime()
	{
		return this.getStarttime();
	}
}
